Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(ec2-metadata-service): implement utils for ec2 metadata service (imds) #5796

Merged
merged 22 commits into from
Mar 18, 2024

Conversation

siddsriv
Copy link
Contributor

@siddsriv siddsriv commented Feb 14, 2024

Issue

#4004

Description

Implementing utils for EC2 instance metadata service

Testing

  PASS  src/MetadataService.e2e.spec.ts
  MetadataService E2E Tests
    ✓ should fetch metadata token successfully (5 ms)
    ✓ should fetch metadata successfully with token (3 ms)
    ✓ should fetch metadata successfully (without token -- disableFetchToken set to true) (2 ms)
    ✓ should handle TimeoutError by falling back to IMDSv1 (2 ms)
    ✓ should handle specific error codes by falling back to IMDSv1 (6 ms)

Test Suites: 1 passed, 1 total
Tests:       5 passed, 5 total
Snapshots:   0 total
Time:        3.119 s, estimated 4 s
Ran all test suites.
Done in 3.66s.

Additional context

Porting as-is from JSv2 to maintain parity.

Checklist

  • If you wrote E2E tests, are they resilient to concurrent I/O?
  • If adding new public functions, did you add the @public tag and enable doc generation on the package?

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@siddsriv siddsriv requested a review from a team as a code owner February 14, 2024 17:16
@siddsriv siddsriv marked this pull request as draft February 14, 2024 17:17
@siddsriv siddsriv changed the title feat(ec2-imds-utils): implement utils for ec2 metadata service feat(ec2-metadata-service): implement utils for ec2 metadata service (imds) Feb 19, 2024
@siddsriv siddsriv force-pushed the ec2-imds-utils branch 2 times, most recently from b91d9cf to 1f259bf Compare March 15, 2024 15:20
@siddsriv siddsriv marked this pull request as ready for review March 15, 2024 20:27
Copy link
Member

@trivikr trivikr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, just some nits on introducing newlines to improve readability.

Copy link
Contributor

@kuhe kuhe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

create a readme.md file

@siddsriv siddsriv merged commit aee792e into aws:main Mar 18, 2024
4 checks passed
@siddsriv siddsriv deleted the ec2-imds-utils branch March 18, 2024 21:01
Copy link

github-actions bot commented Apr 2, 2024

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs and link to relevant comments in this thread.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants